﻿using System;
using SharpSqlAnalyzer.nodes;
using SharpSqlAnalyzer.pp.processor.type.comm;
using SharpSqlAnalyzer.pp.utils;
using SharpSqlAnalyzer.stmt.mssql;

namespace SharpSqlAnalyzer.pp.processor.type.execute
{
	// Token: 0x02000242 RID: 578
	public class ExecParaNewLineProcessor : AbstractProcessor
	{
		// Token: 0x060012FB RID: 4859 RVA: 0x0031BECC File Offset: 0x0031A0CC
		public override void process(TParseTreeNode nodeArg)
		{
			TMssqlExecute tmssqlExecute = nodeArg as TMssqlExecute;
			if (tmssqlExecute.Parameters == null || tmssqlExecute.Parameters.size() == 0)
			{
				return;
			}
			bool? flag = new bool?(this.getParameter<bool>(typeof(bool)));
			if (flag.Value)
			{
				int length = SourceTokenOperator.curIndentLenVT(tmssqlExecute.startToken) + this.Option.indentLen;
				TSourceToken startToken = tmssqlExecute.Parameters.getExecParameter(0).startToken;
				SourceTokenOperator.addBefore(this.Option, startToken, SourceTokenOperator.createReturnSourceToken());
				SourceTokenOperator.addBefore(this.Option, startToken, SourceTokenOperator.createWhitespaceSourceToken(length));
			}
		}
	}
}
